package com.esgpro.esg_api.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

//浏览记录
@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
@TableName("browse")
@ApiModel("浏览记录类")
public class Browse {
    @ApiModelProperty("索引")
    private Integer id;
    @ApiModelProperty("用户索引")
    private int user_id;
    @ApiModelProperty("用户")
    @TableField(exist = false)
    private User user;
    @ApiModelProperty("公司索引")
    private int comp_id;
    @ApiModelProperty("公司")
    @TableField(exist = false)
    private Company company;
    @ApiModelProperty("记录日期")
    private String date;
    @ApiModelProperty("删除状态")
    @TableField("is_delete")
    private boolean isDelete;

    public Browse(Integer id, int user_id, int comp_id, String date, boolean isDelete) {
        this.id = id;
        this.user_id = user_id;
        this.comp_id = comp_id;
        this.date = date;
        this.isDelete = isDelete;
    }

    public Browse(Integer id, User user, Company company, String date, boolean isDelete) {
        this.id = id;
        this.user = user;
        this.company = company;
        this.date = date;
        this.isDelete = isDelete;
    }
}
